Skip to content

fix(sparql-anything): accept an empty output from a readable, non-empty chunk - #836

Open
ddeboer wants to merge 1 commit into
mainfrom
fix/all-filtered-chunk
Open

fix(sparql-anything): accept an empty output from a readable, non-empty chunk#836
ddeboer wants to merge 1 commit into
mainfrom
fix/all-filtered-chunk

Conversation

@ddeboer

@ddeboer ddeboer commented Sep 8, 2026

Copy link
Copy Markdown
Member

convert() rejected any process whose --output was empty, because SPARQL Anything exits 0 when it cannot read or parse an input. A chunk whose rows the query filters out entirely writes a 0-byte output too, and was then reported as an unreadable input, aborting the run.

The converter now tells the two apart by what it can see before starting a process:

  • A relative chunk or load path is relative to workDir for the task runner and for the converter alike, so it is checked first: a missing or empty one fails before any JVM runs, naming the file.
  • An absolute path is the runner’s – under a container’s mount, say – and one that does not exist here proves nothing, so the process runs and its output is held to the old rule.
  • Once every input of a process was seen to be non-empty, an empty output is accepted as “no triples” and contributes nothing to the concatenation. A missing output still fails, as does an empty output of a job without chunks: its input is named in the query, which the converter cannot see, and the admin-codes style query has no legitimate empty result.

Docs updated under “Where files are written” and “How a conversion runs”.

Fix #820

…ty chunk

- Check a process’s chunk and `load` before starting it, when a path can be
  seen from this process – a relative one is relative to `workDir` on both
  sides, an absolute one is the runner’s and may not exist here at all
- Fail a missing or empty input then, naming the file, before a JVM runs
- Accept a 0-byte output as “no triples” once every input was seen to be
  non-empty; keep failing an empty output otherwise, and a missing output
  always, since the converter cannot tell it from an unreadable input
- Keep a chunkless job strict: its input is named in the query, which the
  converter cannot see
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sparql-anything: an all-filtered chunk is reported as an unreadable input

1 participant